package net.sourceforge.m2settings.gui.listerners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;

import net.sourceforge.m2settings.SettingsXMLFileBinder;

import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.ValidationException;

public class ClickSaveActionListener implements ActionListener {
	
	private SettingsXMLFileBinder xmlBinder;

	public ClickSaveActionListener(SettingsXMLFileBinder xmlbind) {
		this.xmlBinder=xmlbind;
	}

	public void actionPerformed(ActionEvent arg0) {
		try {
			xmlBinder.saveSettings();
		} catch (MarshalException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ValidationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
